<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
</head>
<body>
<h1>用户列表</h1>

<a th:href="@{/users/add}">添加</a>

<table>
    <tr>
        <td>ID</td>
        <td>ACCOUNT</td>
        <td>realName</td>
        <td>sex</td>
        <td>birthday</td>
        <td>phone</td>
        <td>操作</td>
    </tr>
    <tr th:each="user:${userList}">
        <td th:text="${user.id}">001</td>
        <td th:text="${user.account}">admin</td>
        <td th:text="${user.realName}">管理员</td>
        <td th:text="${user.sex}">男</td>
        <td th:text="${#dates.format(user.birthday, 'yyyy.MM.dd')}">2000-10-10</td>
        <td th:text="${user.phone}">13312345678</td>
        <td>
            <a th:href="@{/users/delete(id=${user.id})}">删除</a>
            <a th:href="@{/users/toUpdate(id=${user.id})}">修改</a>
        </td>
    </tr>
</table>
</body>
</html>